package com.eastfair.imaster.api;

import com.eastfair.core.base.R;
import com.eastfair.imaster.dto.*;
import com.eastfair.imaster.entity.Company;
import com.eastfair.imaster.entity.Employee;
import com.eastfair.imaster.entity.Product;
import com.eastfair.imaster.hystrix.EmployeeApiFallback;
import com.eastfair.imaster.hystrix.ExhibitorApiFallback;
import com.eastfair.imaster.vo.CompanyVo;
import com.eastfair.imaster.vo.EmployeeVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 员工服务feign接口
 *
 * @ClassName CompanyServiceFeign
 * @Description TODO
 * @Author liuxiaobai
 * @Date 2021/8/19 5:14 下午
 * @Version 1.0
 */
@FeignClient(value = "imaster/employee",fallback = EmployeeApiFallback.class)
public interface EmployeeServiceFeign {

    /**
     * 将用户拉入到公司，成为公司员工
     * @param employeeDTO
     * @return
     */
    @ApiOperation(value = "将用户拉入到公司，成为公司员工", notes = "将用户拉入到公司，成为公司员工")
    @PostMapping("/addUserIdOfCompany")
    R addUserIdOfCompany(@RequestBody EmployeeDTO employeeDTO);


    /**
     * 公司员工解绑
     * @param employeeDTO
     * companyId      公司id
     * id 员工id
     * @return
     */
    @ApiOperation(value = "公司员工解绑", notes = "公司员工解绑")
    @PostMapping("/breaklUserIdOfCompany")
    R breaklUserIdOfCompany(@RequestBody EmployeeDTO employeeDTO) ;



    /**
     * 修改员工用户基本信息
     * @param employeeDTO
     * @return
     */
    @ApiOperation(value = "修改员工用户基本信息", notes = "修改员工用户基本信息")
    @PutMapping("/updateCompanyUser")
    R updateCompanyUser(@RequestBody EmployeeDTO employeeDTO);



}
